{include file="header.tpl"}
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
  <tr>
    <td width="14%" valign="top">{include file="lside2.tpl"}</td>
    <td width="81%" valign="top">
<h3>Withdrawal</h3>
 <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  <tr>
    <td width="100%" class="tablebg">
<p align=justify>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="394">
  <tr>
    <td width="100%" height="15">
    <img border="0" src="images/withdrawal.jpg" class="imgradius"></td>
  </tr>
  <tr>
    <td width="100%" height="11"></td>
  </tr>
  <tr>
    <td width="100%" height="368" valign="top">{if $say eq 'processed'}
{if $batch eq ''}Withdrawal request saved.{else} Withdrawal processed. Batch id: {$batch}{/if}
<br><br>
{/if}

{if $fatal}

{if $fatal == 'one_per_month'}
You can withdraw once per month only.
{/if}

{if $fatal == 'times_limit'}
You can withdraw {$settings.limit_withdraw_period_times} per {$settings.limit_withdraw_period_date} only.
{/if}


{if $fatal == 'withdrawal_percent_reached'}
Withdrawl percent has been reached. We have stopped all withdrawals.
{/if}

{else}

{if $say eq 'on_hold'}
Sorry, this amount on hold now.<br><br>
{/if}
{if $say eq 'zero'}
Sorry, you can't request a withdraw smaller than {$currency_sign}0.00 only<br><br>
{/if}
{if $say eq 'less_min'}
Sorry, you can request not less than {$currency_sign}{$settings.min_withdrawal_amount}<br><br>
{/if}
{if $say eq 'less_min_bankwire'}
Sorry, you can request not less than {$currency_sign}1000 for BankWire withdrawal<br><br>
{/if}
{if $say eq 'greater_max'}
Sorry, you can request not greater than {$currency_sign}{$settings.max_withdrawal_amount}<br><br>
{/if}
{if $say eq 'daily_limit'}
Sorry, you have exceeded a daily limit<br><br>
{/if}
{if $say eq 'not_enought'}
Sorry, you have requested the amount larger than the one on your balance.<br><br>
{/if}
{if $say eq 'invalid_transaction_code'}
You have entered the invalid transaction code.<br><br>
{/if}
{if $say eq 'no_deposits'}
You have not done any deposits yet. Withdrawal function will be available after a deposit.
<br><br>
{/if}
{if $say eq 'no_active_deposits'}
You must have active deposit to withdraw.
{/if}


{if $preview}

<form method=post>
<input type=hidden name=a value=withdraw>
<input type=hidden name=action value=withdraw>
<input type=hidden name=amount value={$amount}>
<input type=hidden name=ec value={$ec}>
<input type=hidden name=comment value="{$comment|escape:html}">

<table cellspacing=0 cellpadding=2 border=0>
<tr>
 <td colspan=2>You are withdrawing <b>{$currency_sign}{$amount}</b> of {$currency}. 
{if $settings.withdrawal_fee > 0 || $settings.withdrawal_fee_min > 0} Our fee is 
{if $settings.withdrawal_fee > 0}<b>{$settings.withdrawal_fee}%</b>{/if}
{if $settings.withdrawal_fee > 0 && $settings.withdrawal_fee_min > 0} or {/if}
{if $settings.withdrawal_fee_min > 0} <b>{$currency_sign}{$settings.withdrawal_fee_min}</b>{if $settings.withdrawal_fee > 0} as a minimum{/if}{/if}
.
{else}
We have no fee for this operation. 
{/if}
</td>
</tr>
<tr>
 <td colspan=2>Actually you will acquire the total of <b>{$currency_sign}{$to_withdraw}</b> on your {$currency} account {if $account}{$account}{/if}.</td>
</tr>
{if $comment}
<tr>
 <td colspan=2>Your comments: {$comment|escape:html}</td>
</tr>
{/if}
{if $settings.use_transaction_code && $userinfo.transaction_code}
<tr>
 <td colspna=2>&nbsp;</td>
</tr>
<tr>
 <td width=1% nowrap>Transaction Code:</td>
 <td width=99%><input type="password" name="transaction_code" class=inpts size=15></td>
</tr>
{/if}
<tr>
 <td><br><input type=submit value="Confirm" class=sbmt></td>
</tr></table>
</form>


{else}


<form method=post>
<input type=hidden name=a value=withdraw>
<input type=hidden name=action value=preview>

<table cellspacing=0 cellpadding=2 border=0>
<tr>
 <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
   <tr>
     <td width="100%">
     <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
       <tr>
         <td width="48%" valign="top" class="wbg wimg1">
         <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3" height="269">
           <tr>
             <td width="50%" height="40" class="winfo" colspan="2"><b>Account Balance:</b></td>
             <td width="50%" height="40" class="winfo">{$currency_sign}<b>{$ab_formated.total}</b></td>
           </tr>
           <tr>
             <td width="11%" height="28" class="wborder">
             <img border="0" src="images/slr.PNG"></td>
             <td width="39%" height="28" class="wborder">{$ps[5].name}:</td>
             <td width="50%" height="28" class="wborder">{$currency_sign}{$ps[5].balance}</td>
           </tr>
           <tr>
             <td width="11%" height="29" class="wborder">
             <img border="0" src="/images/spm.PNG"></td>
             <td width="39%" height="29" class="wborder">{$ps[8].name}:</td>
             <td width="50%" height="29" class="wborder">{$currency_sign}{$ps[8].balance}</td>
           </tr>
           <tr>
             <td width="11%" height="29" class="wborder">
             <img border="0" src="/images/sego.PNG"></td>
             <td width="39%" height="29" class="wborder">{$ps[24].name}:</td>
             <td width="50%" height="29" class="wborder">{$currency_sign}{$ps[24].balance}</td>
           </tr>
           <tr>
             <td width="50%" height="143" valign="top" colspan="2">&nbsp;</td>
             <td width="50%" height="143" valign="top">&nbsp;</td>
           </tr>
         </table>
         </td>
         <td width="2%" valign="top">&nbsp;</td>
         <td width="50%" valign="top" class="wbg wimg2">{if $other_processings}
For other eCurrencies please provide your <br> Payee Account details in the comments field below.
{/if}

{if $withdraw_systems}
<table cellspacing=0 cellpadding=2 border=0 width=200 height="190">
<tr>
 <td colspan=2 height="19">&nbsp;</td>
</tr>
<tr>
 <td height="19">Select eCurrency:</td>
 <td height="19">
 <p align="right"><select name=ec class="hisinpts wsize1">

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   {section name=p loop=$withdraw_systems}
   <option value={$withdraw_systems[p].id}>{$withdraw_systems[p].name}</option>

     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     {/section}
     </select>
 </td>
</tr><tr>
 <td height="38">Withdrawal ({$currency_sign}):</td>
 <td height="38">
 <p align="right">
 <input type=text name=amount value="10.00" class="hisinpts wsize1" size=15></td>
</tr><tr>
 <td colspan=2 height="68"><textarea name=comment class=hisinpts cols=45 rows=4>Your comment</textarea>
</tr>
<tr>
 <td height="26">&nbsp;</td>
 <td height="26"><input type=submit value="Submit" class=sbmt></td>
</tr></table>
</td>
       </tr>
     </table>
     </td>
   </tr>
 </table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
  <tr>
    <td width="100%" class="winfo"><b>Pending:</b> <font color="#F1EFBB">{$currency_sign}</font>{if $ab_formated.withdraw_pending != 0}<font color="#F1EFBB">{$ab_formated.withdraw_pending}</font>{else}<font color="#F1EFBB">0.00</font>{/if} , {section name=ps loop=$pay_accounts}<b>{$pay_accounts[ps].name}:</b> {if $pay_accounts[ps].account != ''}<font color="#F1EFBB">{$pay_accounts[ps].account}</font> {else}<a class="winfo2" href="?a=edit_account">not set</a> {/if}{/section}</td>
  </tr>
</table>{else}
<br><b>You have no funds to withdraw.</b>
{/if}
</form>

{/if}

{/if}</td>
  </tr>
</table>

</td>
  </tr>
</table>
</td>
  </tr>
</table>

{include file="footer.tpl"}